home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14692 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  37 lines

  1. Newsgroups: comp.lang.ada,comp.lang.c++
  2. Path: in2.uu.net!world!bobduff
  3. From: bobduff@world.std.com (Robert A Duff)
  4. Subject: Re: some questions re. Ada/GNAT from a C++/GCC user
  5. Message-ID: <Dp74u6.8sM@world.std.com>
  6. Organization: The World Public Access UNIX, Brookline, MA
  7. References: <wnewmanDoxrCp.DKv@netcom.com> <Dp1oAw.7Cz@world.std.com> <ROGOFF.96Mar29163036@sccm.Stanford.EDU> <4jovi9$c2b@wdl1.wdl.loral.com>
  8. Date: Mon, 1 Apr 1996 18:32:30 GMT
  9.  
  10. In article <4jovi9$c2b@wdl1.wdl.loral.com>,
  11. Mark A Biggar <mab@dst17.wdl.loral.com> wrote:
  12. >Yeah, 2 reasons.  The first goes clear back to the original Ada Strawman
  13. >documnt which calls for a clear distinction between declarations and code
  14. >statements.
  15.  
  16. But Ada does *not* have such a clear distinction.  Declarations do lots
  17. of stuff at run time, in Ada.  In Pascal, the "begin" makes sense --
  18. that's where execution starts; everything before that is purely
  19. compile-time declarative stuff.  Not true in Ada.  If you're dealing
  20. with Strings, for example, you often end up with *most* of the run-time
  21. algorithm *before* the "begin", because Ada's Strings can't change size,
  22. so you need to build up the result by declaring objects (usually
  23. constants) during elaboration.
  24.  
  25. >...  The second reason is that is also the method of wraping an
  26. >exception handler around soem arbitary piece of code:
  27.  
  28. Nah, this doesn't explain why I need extra syntax for very local
  29. variables.  It explains why I need extra syntax when there are exception
  30. handlers, but there usually aren't.  So this is another case of the tail
  31. wagging the dog.  It's fine to have extra syntax to delimit the region
  32. in which an exception handler applies, but that shouldn't complicate
  33. things for somebody who just wants to declare a variable, and doesn't
  34. want any exception handling.
  35.  
  36. - Bob
  37.